using System;
using UnityEngine;

namespace DL.AnimatorEvents
{
    /// <summary>
    /// 用于启动动画事件
    /// </summary>
    public class AnimatorEvent : MonoBehaviour
    {
        public event Action AttackEvent;
        public event Action AttackOpenEvent;
        public event Action AttackCloseEvent;
        public event Action DodgeCalcelEvent;
        private void Attack()
        {
            AttackEvent?.Invoke();
            Debug.Log("战斗伤害结算完成");
        }

        private void AttackOpen()
        {
            AttackOpenEvent?.Invoke();
            Debug.Log("战斗伤害结算开始");
        }

        private void AttackClose()
        {
            AttackCloseEvent?.Invoke();
            Debug.Log("战斗伤害结算完成");
        }

        private void DodgeCalcel()
        {
            DodgeCalcelEvent?.Invoke();
            Debug.Log("DodgeCalcel结算完成");
        }
    }
}
